# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdebugsettings
pkgver=22.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/utilities/"
pkgdesc="An application to enable/disable qCDebug"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev kcoreaddons-dev kconfig-dev kdbusaddons-dev ki18n-dev kwidgetsaddons-dev kitemviews-dev kcompletion-dev samurai"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdebugsettings-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
b450c01ee822dba7cd13311de0126540fe3730022fa88c12cfc706059f2e721f65665470dbf83faecf2e86a71f8ff84caa40c2f290c24f55c6e713b844fe56ac  kdebugsettings-22.04.3.tar.xz
"
